PowerKey Pro is an ideal partner to Maxum Development’s PageSentry. You can use PageSentry’s notification feature to automatically restart a web server with PowerKey Pro when it stops serving pages.
For more information on PowerKey Pro, contact
Sophisticated Circuits, Inc.
19017 120th Ave NE, Suite 106
Bothell, WA 98011
Phone 206-485-7979
Fax 206-485-7172
E-mail <mailto://support@sophisticated.com>
Web <http://www.sophisticated.com/>
For more information on PageSentry, contact
Maxum Development Corporation
820 South Bartlett Road, Suite 104
Streamwood, IL 60107
Phone 847-830-1113
Fax 847-830-1262
E-mail <mailto://techsup@maxum.com>
Web <http://www.maxum.com/>
What You Need
This technique require two computers. The monitoring Mac must be a Macintosh® or Mac® OS™ compatible computer capable of running PowerKey Pro and PageSentry (see the products’ respective manuals for details). The web server can be any kind of microcomputer whose power switch can be locked in the “on” position (see next paragraph). You can also control additional web servers, by using different PowerKey Pro outlets or even additional PowerKey Pro units.
If your web server is a Mac with “soft power” (i.e. the ability to turn itself on when you press the triangle key on the keyboard), you may have to set it up to ensure that it will start up when PowerKey Pro switches its outlet. How to set this up depends on your Mac model.
1. Older Macs (most Mac II models, Centrises and Quadras) and some PowerMacs (e.g. the 7100 and 8100) have a locking power switch in the back of the computer. To lock this switch on, turn this switch clockwise 90°.
2. Newer Macs (e.g. the Quadra 840av, the PowerMac 7200) include a control panel named “Auto Power On/Off” or “Energy Saver”. These control panels have options that will make the computer start up after a power failure. In the Auto On/Off control panel, this check box is in the main window. In the Energy Saver control panel, this check box is in the “Server Settings” item of the “Preferences” menu. Make sure this box is checked.
For more information, consult the manual for your computer.
How To Do It
1. Install PowerKey Pro and PageSentry on the monitoring Mac as described in their respective manuals.
2. Copy the “PowerKey Script” AppleScript into the same folder as the PageSentry application on the monitoring computer.
3. Plug the AC power cord for the web server into one of the outlets/outlet groups of your PowerKey Pro. If you wish to control more than one server, plug them each into a different outlet/outlet group.
Note: When the PowerKey restarts the web server, it turns the power to its outlet off for several seconds, and then back on, so don’t connect anything else to this outlet/outlet group.
4. In the PowerKey Editor, select “Hardware Setup...” from the Edit menu and make note of the name assigned to the electrial outlet used for the web server.
Note: If you are controlling more than one web server, make sure all the outlets/outlet groups are given different names.
5. Check the events in the Powerkey Pro schedule to make sure that none of them will accidentally turn the server’s outlet off by mistake. (For example, you will probably need to modify the default User Shut Down event.)
6. Follow the instructions in the PageSentry manual to create a Sentry for the server you wish to monitor. Open the Sentry Setup dialog, and enter values into the “AppleEvent Notification” area as follows: Enter “PowerKey Script” into the Application field, and the name of the desired outlet into the “Extra Info” field.
What Will Happen
When PageSentry gets an error, it will execute the PowerKey Script, and tell it the name of the outlet where the server is connected. The script will then turn that outlet off, wait a few seconds, and turn it back on. The server will then start up normally. If you’ve set it up to launch the web server software at startup, it will resume serving pages automatically!
PowerKey is a registered trademark of Sophisticated Circuits, Inc. Macintosh, Mac, Centris, Quadra and PowerMac are registered trademarks, and Mac OS is a trademark of Apple Computer, Inc.